package main

import "fmt"

func lengthOfNo(s string)int {
	lastOccurred:=make(map[byte]int)
	start:=0
	maxLength:=0
	for i,ch:=range []byte(s){
		if lastOccurred[ch]>=start{
			start=lastOccurred[ch]+1
		}
		if i-start+1>maxLength{
			maxLength=i-start+1
		}

	}

	return maxLength+1
}

func main() {
	i:=lengthOfNo("a")
	fmt.Println(i)
}